<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>我的世界MOD百科-管理员模版</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#E67E22',
                        secondary: '#557A46',
                        dark: '#1E293B',
                        'dark-light': '#343E4E',
                        'text-light': '#F8FAFC',
                        'text-medium': 'rgba(248, 250, 252, 0.7)',
                        'text-dark': 'rgba(248, 250, 252, 0.9)'
                    },
                    fontFamily: {
                        sans: ['Arial', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }

            .bg-blur {
                backdrop-filter: blur(10px);
            }

            .text-shadow {
                text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            }

            .card-hover {
                @apply transition-all duration-300 hover:-translate-y-2 hover:shadow-lg;
            }

            .btn-primary {
                @apply bg-primary text-white font-bold py-2 px-4 rounded shadow transition-all duration-150 hover:bg-primary/80 hover:-translate-y-1 hover:shadow-lg;
            }

            .btn-secondary {
                @apply bg-secondary text-white font-bold py-2 px-4 rounded shadow transition-all duration-150 hover:bg-secondary/80 hover:-translate-y-1 hover:shadow-lg;
            }

            .btn-danger {
                @apply bg-red-500 text-white font-bold py-2 px-4 rounded shadow transition-all duration-150 hover:bg-red-600 hover:-translate-y-1 hover:shadow-lg;
            }

            .btn-edit {
                @apply bg-blue-500 text-white font-bold py-2 px-4 rounded shadow transition-all duration-150 hover:bg-blue-600 hover:-translate-y-1 hover:shadow-lg;
            }

            .btn-approve {
                @apply bg-green-500 text-white font-bold py-2 px-4 rounded shadow transition-all duration-150 hover:bg-green-600 hover:-translate-y-1 hover:shadow-lg;
            }

            .btn-reject {
                @apply bg-red-500 text-white font-bold py-2 px-4 rounded shadow transition-all duration-150 hover:bg-red-600 hover:-translate-y-1 hover:shadow-lg;
            }

            .status-critical {
                @apply bg-red-500 text-white text-xs px-2 py-1 rounded;
            }

            .status-medium {
                @apply bg-orange-500 text-white text-xs px-2 py-1 rounded;
            }

            .status-minor {
                @apply bg-blue-500 text-white text-xs px-2 py-1 rounded;
            }

            .status-info {
                @apply bg-secondary text-white text-xs px-2 py-1 rounded;
            }
        }
    </style>
</head>

<body class="bg-dark text-text-light min-h-screen flex flex-col">
<!-- 导航栏 -->
<nav class="bg-dark/90 text-white shadow-lg sticky top-0 z-50 bg-blur" id="navigationBar">
    <div class="container mx-auto px-4 py-3 flex justify-between items-center">
        <div class="flex items-center">
            <h1 class="text-xl font-bold">我的世界<span class="text-primary">MOD</span>百科 - 管理员模块</h1>
        </div>
        <div class="hidden md:flex items-center space-x-6">
            <a class="font-bold hover:text-primary transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all after:duration-300 hover:after:w-full"
               href="#">首页</a>
            <a class="font-bold hover:text-primary transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all after:duration-300 hover:after:w-full"
               href="#">开发者/团队管理</a>
            <a class="font-bold hover:text-primary transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all after:duration-300 hover:after:w-full"
               href="#">MOD警示管理</a>
            <a class="font-bold hover:text-primary transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all after:duration-300 hover:after:w-full"
               href="#">评论管理</a>
            <a class="font-bold hover:text-primary transition-colors duration-200 relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all after:duration-300 hover:after:w-full"
               href="#">审核管理</a>
            <!-- 用户头像 -->
            <div class="flex items-center space-x-3">
                <img alt="用户头像" class="w-8 h-8 rounded-full bg-white" src="https://picsum.photos/200/200">
                <a class="font-bold" href="#">管理员</a>
                <a class="text-red-400 hover:text-red-500 transition-colors duration-200" href="#">退出</a>
            </div>
        </div>
        <button class="md:hidden text-white text-xl" id="menu-toggle">
            <i class="fa fa-bars"></i>
        </button>
    </div>
</nav>

<!-- 开发者/开发团队管理 -->
<section class="developer-list bg-dark-light/80 bg-blur py-10">
    <div class="container mx-auto px-4">
        <h1 class="text-2xl font-bold mb-6 text-center">开发者/开发团队管理</h1>
        <div class="controls mb-6 flex justify-between items-center">
            <button class="btn-secondary" onclick="openDeveloperModal(null)">
                <i class="fa fa-plus mr-2"></i>添加开发者/团队
            </button>
            <div class="flex space-x-2">
                <div class="relative">
                    <input class="bg-dark border border-gray-700 rounded px-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-primary"
                           placeholder="搜索开发者..."
                           type="text">
                    <i class="fa fa-search absolute right-3 top-3 text-gray-400"></i>
                </div>
                <select class="bg-dark border border-gray-700 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
                    <option value="">全部类型</option>
                    <option value="developer">开发者</option>
                    <option value="team">团队</option>
                </select>
            </div>
        </div>
        <div class="overflow-x-auto">
            <table class="w-full bg-dark rounded-lg shadow-lg" id="developerTable">
                <thead>
                <tr class="bg-secondary text-white">
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">ID</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">名称</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">描述</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">创建日期</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">操作</th>
                </tr>
                </thead>
                <tbody id="developerTableBody">
                <!-- 开发者/团队数据将通过JavaScript动态生成 -->
                </tbody>
            </table>
        </div>
    </div>
</section>

<!-- MOD特性警示管理 -->
<section class="mod-list bg-dark py-10">
    <div class="container mx-auto px-4">
        <h1 class="text-2xl font-bold mb-6 text-center">MOD特性警示管理</h1>
        <div class="controls mb-6 flex justify-between items-center">
            <button class="btn-secondary" onclick="openWarningModal(null)">
                <i class="fa fa-plus mr-2"></i>添加警示
            </button>
            <div class="flex space-x-2">
                <div class="relative">
                    <input class="bg-dark-light border border-gray-700 rounded px-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-primary"
                           placeholder="搜索MOD..."
                           type="text">
                    <i class="fa fa-search absolute right-3 top-3 text-gray-400"></i>
                </div>
                <select class="bg-dark-light border border-gray-700 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
                    <option value="">全部类型</option>
                    <option value="critical">严重</option>
                    <option value="medium">中等</option>
                    <option value="minor">轻微</option>
                    <option value="info">信息</option>
                </select>
            </div>
        </div>
        <div class="overflow-x-auto">
            <table class="w-full bg-dark-light rounded-lg shadow-lg" id="warningTable">
                <thead>
                <tr class="bg-secondary text-white">
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">ID</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">模组</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">标题</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">内容</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">类型</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">操作</th>
                </tr>
                </thead>
                <tbody id="warningTableBody">
                <!-- 警告数据将通过JavaScript动态生成 -->
                </tbody>
            </table>
        </div>
    </div>
</section>

<!-- 评论管理 -->
<section class="comment-list bg-dark-light/80 bg-blur py-10">
    <div class="container mx-auto px-4">
        <h1 class="text-2xl font-bold mb-6 text-center">评论管理</h1>
        <div class="controls mb-6 flex justify-between items-center">
            <div class="flex space-x-2">
                <div class="relative">
                    <input class="bg-dark border border-gray-700 rounded px-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-primary"
                           placeholder="搜索评论..."
                           type="text">
                    <i class="fa fa-search absolute right-3 top-3 text-gray-400"></i>
                </div>
                <select class="bg-dark border border-gray-700 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
                    <option value="">全部模组</option>
                    <option value="mod1">模组1</option>
                    <option value="mod2">模组2</option>
                    <option value="mod3">模组3</option>
                </select>
            </div>
        </div>
        <div class="overflow-x-auto">
            <table class="w-full bg-dark rounded-lg shadow-lg" id="commentTable">
                <thead>
                <tr class="bg-secondary text-white">
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">ID</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">模组</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">用户</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">内容</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">日期</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">操作</th>
                </tr>
                </thead>
                <tbody id="commentTableBody">
                <!-- 评论数据将通过JavaScript动态生成 -->
                </tbody>
            </table>
        </div>
    </div>
</section>

<!-- 审核管理 -->
<section class="review-list bg-dark py-10">
    <div class="container mx-auto px-4">
        <h1 class="text-2xl font-bold mb-6 text-center">审核管理</h1>
        <div class="controls mb-6 flex justify-between items-center">
            <div class="flex space-x-2">
                <div class="relative">
                    <input class="bg-dark-light border border-gray-700 rounded px-4 py-2 w-64 focus:outline-none focus:ring-2 focus:ring-primary"
                           placeholder="搜索审核项..."
                           type="text">
                    <i class="fa fa-search absolute right-3 top-3 text-gray-400"></i>
                </div>
                <select class="bg-dark-light border border-gray-700 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary">
                    <option value="">全部状态</option>
                    <option value="pending">待审核</option>
                    <option value="approved">已通过</option>
                    <option value="rejected">已拒绝</option>
                </select>
            </div>
        </div>
        <div class="overflow-x-auto">
            <table class="w-full bg-dark-light rounded-lg shadow-lg" id="reviewTable">
                <thead>
                <tr class="bg-secondary text-white">
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">ID</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">模组</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">状态</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">提交日期</th>
                    <th class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">操作</th>
                </tr>
                </thead>
                <tbody id="reviewTableBody">
                <!-- 审核数据将通过JavaScript动态生成 -->
                </tbody>
            </table>
        </div>
    </div>
</section>

<!-- 开发者/开发团队模态框 -->
<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center hidden" id="developerModal">
    <div class="bg-dark-light rounded-lg shadow-xl w-full max-w-2xl mx-4 transform transition-all duration-300 scale-95 opacity-0"
         id="developerModalContent">
        <div class="flex justify-between items-center p-6 border-b border-gray-700">
            <h2 class="text-xl font-bold">开发者/开发团队信息</h2>
            <button class="text-gray-400 hover:text-white transition-colors duration-200"
                    onclick="closeDeveloperModal()">
                <i class="fa fa-times text-xl"></i>
            </button>
        </div>
        <form class="p-6" id="developerForm">
            <input id="developerId" type="hidden">
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="developerName">名称</label>
                <input class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                       id="developerName" required
                       type="text">
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="developerDescription">描述</label>
                <textarea
                        class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                        id="developerDescription"
                        rows="4"></textarea>
            </div>
            <div class="flex justify-end space-x-3 mt-6">
                <button class="px-4 py-2 bg-gray-700 text-white rounded hover:bg-gray-600 transition-colors duration-200"
                        onclick="closeDeveloperModal()"
                        type="button">
                    取消
                </button>
                <button class="btn-secondary" onclick="saveDeveloper()" type="button">保存</button>
            </div>
        </form>
    </div>
</div>

<!-- MOD特性警示模态框 -->
<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center hidden" id="warningModal">
    <div class="bg-dark-light rounded-lg shadow-xl w-full max-w-2xl mx-4 transform transition-all duration-300 scale-95 opacity-0"
         id="warningModalContent">
        <div class="flex justify-between items-center p-6 border-b border-gray-700">
            <h2 class="text-xl font-bold">MOD特性警示信息</h2>
            <button class="text-gray-400 hover:text-white transition-colors duration-200" onclick="closeWarningModal()">
                <i class="fa fa-times text-xl"></i>
            </button>
        </div>
        <form class="p-6" id="warningForm">
            <input id="warningId" type="hidden">
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="warningMod">模组</label>
                <input class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                       id="warningMod" required
                       type="text">
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="warningTitle">标题</label>
                <input class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                       id="warningTitle" required
                       type="text">
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="warningContent">内容</label>
                <textarea
                        class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                        id="warningContent" required
                        rows="4"></textarea>
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="warningType">类型</label>
                <select class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                        id="warningType">
                    <option value="critical">严重</option>
                    <option value="medium">中等</option>
                    <option value="minor">轻微</option>
                    <option value="info">信息</option>
                </select>
            </div>
            <div class="flex justify-end space-x-3 mt-6">
                <button class="px-4 py-2 bg-gray-700 text-white rounded hover:bg-gray-600 transition-colors duration-200"
                        onclick="closeWarningModal()"
                        type="button">
                    取消
                </button>
                <button class="btn-secondary" onclick="saveWarning()" type="button">保存</button>
            </div>
        </form>
    </div>
</div>

<!-- 评论模态框 -->
<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center hidden" id="commentModal">
    <div class="bg-dark-light rounded-lg shadow-xl w-full max-w-2xl mx-4 transform transition-all duration-300 scale-95 opacity-0"
         id="commentModalContent">
        <div class="flex justify-between items-center p-6 border-b border-gray-700">
            <h2 class="text-xl font-bold">评论信息</h2>
            <button class="text-gray-400 hover:text-white transition-colors duration-200" onclick="closeCommentModal()">
                <i class="fa fa-times text-xl"></i>
            </button>
        </div>
        <form class="p-6" id="commentForm">
            <input id="commentId" type="hidden">
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="commentMod">模组</label>
                <input class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                       id="commentMod" required
                       type="text">
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="commentUser">用户</label>
                <input class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                       id="commentUser" required
                       type="text">
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="commentContent">内容</label>
                <textarea
                        class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                        id="commentContent" required
                        rows="4"></textarea>
            </div>
            <div class="flex justify-end space-x-3 mt-6">
                <button class="px-4 py-2 bg-gray-700 text-white rounded hover:bg-gray-600 transition-colors duration-200"
                        onclick="closeCommentModal()"
                        type="button">
                    取消
                </button>
                <button class="btn-secondary" onclick="saveComment()" type="button">保存</button>
            </div>
        </form>
    </div>
</div>

<!-- 审核模态框 -->
<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center hidden" id="reviewModal">
    <div class="bg-dark-light rounded-lg shadow-xl w-full max-w-2xl mx-4 transform transition-all duration-300 scale-95 opacity-0"
         id="reviewModalContent">
        <div class="flex justify-between items-center p-6 border-b border-gray-700">
            <h2 class="text-xl font-bold">审核信息</h2>
            <button class="text-gray-400 hover:text-white transition-colors duration-200" onclick="closeReviewModal()">
                <i class="fa fa-times text-xl"></i>
            </button>
        </div>
        <form class="p-6" id="reviewForm">
            <input id="reviewId" type="hidden">
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="reviewMod">模组</label>
                <input class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                       id="reviewMod" required
                       type="text">
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="reviewStatus">状态</label>
                <select class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                        id="reviewStatus">
                    <option value="pending">待审核</option>
                    <option value="approved">已通过</option>
                    <option value="rejected">已拒绝</option>
                </select>
            </div>
            <div class="mb-4">
                <label class="block text-sm font-medium text-gray-300 mb-1" for="reviewComment">审核意见</label>
                <textarea
                        class="w-full bg-dark border border-gray-600 rounded px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary"
                        id="reviewComment"
                        rows="3"></textarea>
            </div>
            <div class="flex justify-end space-x-3 mt-6">
                <button class="px-4 py-2 bg-gray-700 text-white rounded hover:bg-gray-600 transition-colors duration-200"
                        onclick="closeReviewModal()"
                        type="button">
                    取消
                </button>
                <button class="btn-secondary" onclick="saveReview()" type="button">保存</button>
            </div>
        </form>
    </div>
</div>

<!-- 确认删除模态框 -->
<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center hidden" id="confirmDeleteModal">
    <div class="bg-dark-light rounded-lg shadow-xl w-full max-w-md mx-4 transform transition-all duration-300 scale-95 opacity-0"
         id="confirmDeleteModalContent">
        <div class="p-6">
            <h3 class="text-xl font-bold mb-4" id="confirmDeleteTitle">确认删除</h3>
            <p class="text-gray-300 mb-6" id="confirmDeleteMessage">你确定要删除这个项目吗？此操作不可撤销。</p>
            <div class="flex justify-end space-x-3">
                <button class="px-4 py-2 bg-gray-700 text-white rounded hover:bg-gray-600 transition-colors duration-200"
                        onclick="closeConfirmDeleteModal()"
                        type="button">
                    取消
                </button>
                <button class="btn-danger" onclick="confirmDelete()" type="button">删除</button>
            </div>
        </div>
    </div>
</div>

<script>
    // 存储开发者/开发团队数据
    let developers = [
        {id: 1, name: "Mojang Studios", description: "Minecraft的原始开发团队", createdAt: "2023-01-15"},
        {id: 2, name: "Forge Modders", description: "专注于Minecraft Forge模组开发", createdAt: "2023-02-20"},
        {id: 3, name: "Fabric Team", description: "Fabric模组API的开发者", createdAt: "2023-03-10"},
        {
            id: 4,
            name: "Roguelike Development",
            description: "专注于Roguelike风格的Minecraft模组",
            createdAt: "2023-04-05"
        }
    ];
    // 存储警告数据
    let warnings = [
        {
            id: 1,
            mod: "Nether Expansion",
            title: "游戏崩溃风险",
            content: "此MOD可能导致游戏在特定场景下崩溃，尤其是在多人服务器中使用时。",
            type: "critical",
            createdAt: "2023-05-22"
        },
        {
            id: 2,
            mod: "Performance Boost",
            title: "性能影响",
            content: "使用此MOD可能导致游戏帧率下降，尤其是在配置较低的电脑上。",
            type: "medium",
            createdAt: "2023-06-10"
        },
        {
            id: 3,
            mod: "Advanced Machinery",
            title: "兼容性问题",
            content: "与最新版本游戏可能存在兼容性问题，建议等待开发者更新。",
            type: "medium",
            createdAt: "2023-07-05"
        },
        {
            id: 4,
            mod: "Magic World",
            title: "新功能提示",
            content: "此MOD添加了新的游戏机制和魔法系统，可能需要一些时间来适应。",
            type: "info",
            createdAt: "2023-08-15"
        }
    ];
    // 存储评论数据
    let comments = [
        {
            id: 1,
            mod: "Nether Expansion",
            user: "Player123",
            content: "这个模组真的很棒，增加了很多地狱的内容！",
            createdAt: "2023-09-01"
        },
        {
            id: 2,
            mod: "Performance Boost",
            user: "Gamer456",
            content: "用了之后感觉游戏更流畅了，推荐！",
            createdAt: "2023-09-10"
        },
        {
            id: 3,
            mod: "Advanced Machinery",
            user: "TechLover",
            content: "机器太复杂了，希望有更详细的教程。",
            createdAt: "2023-09-15"
        },
        {
            id: 4,
            mod: "Magic World",
            user: "FantasyFan",
            content: "魔法系统非常有趣，但是有些技能感觉有点不平衡。",
            createdAt: "2023-09-20"
        }
    ];
    // 存储审核数据
    let reviews = [
        {id: 1, mod: "Aquatic Life", status: "pending", submittedAt: "2023-10-01", reviewedAt: ""},
        {id: 2, mod: "Dungeon Crawl", status: "approved", submittedAt: "2023-10-05", reviewedAt: "2023-10-07"},
        {id: 3, mod: "Skyblock", status: "rejected", submittedAt: "2023-10-10", reviewedAt: "2023-10-12"},
        {id: 4, mod: "Automation Tools", status: "pending", submittedAt: "2023-10-15", reviewedAt: ""}
    ];

    let currentDeveloperId = null;
    let currentWarningId = null;
    let currentCommentId = null;
    let currentReviewId = null;
    let deleteCallback = null;

    // 页面加载时显示所有数据
    document.addEventListener('DOMContentLoaded', () => {
        displayDevelopers();
        displayWarnings();
        displayComments();
        displayReviews();

        // 移动菜单切换
        $('#menu-toggle').click(function () {
            // 这里可以添加移动菜单的切换逻辑
            alert('移动菜单功能将在未来版本中实现');
        });
    });

    // 显示所有开发者/开发团队
    function displayDevelopers() {
        const tableBody = document.getElementById('developerTableBody');
        tableBody.innerHTML = '';

        if (developers.length === 0) {
            const row = document.createElement('tr');
            row.innerHTML = `<td colspan="5" class="px-6 py-4 text-center text-gray-400">没有找到开发者/团队</td>`;
            tableBody.appendChild(row);
            return;
        }

        developers.forEach(developer => {
            const row = document.createElement('tr');
            row.className = 'hover:bg-dark-light/50 transition-colors duration-200';
            row.innerHTML = `
                    <td class="px-6 py-4 whitespace-nowrap">${developer.id}</td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <div class="font-medium text-white">${developer.name}</div>
                    </td>
                    <td class="px-6 py-4">
                        <div class="text-sm text-gray-300 max-w-xs truncate">${developer.description}</div>
                    </td>
                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">${developer.createdAt}</td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <button class="btn-edit mr-2" onclick="openDeveloperModal(${developer.id})">
                            <i class="fa fa-pencil mr-1"></i>编辑
                        </button>
                        <button class="btn-danger" onclick="confirmDeleteDeveloper(${developer.id})">
                            <i class="fa fa-trash mr-1"></i>删除
                        </button>
                    </td>
                `;
            tableBody.appendChild(row);
        });
    }

    // 显示所有警告
    function displayWarnings() {
        const tableBody = document.getElementById('warningTableBody');
        tableBody.innerHTML = '';

        if (warnings.length === 0) {
            const row = document.createElement('tr');
            row.innerHTML = `<td colspan="6" class="px-6 py-4 text-center text-gray-400">没有找到警告</td>`;
            tableBody.appendChild(row);
            return;
        }

        warnings.forEach(warning => {
            const row = document.createElement('tr');
            row.className = 'hover:bg-dark/50 transition-colors duration-200';
            row.innerHTML = `
                    <td class="px-6 py-4 whitespace-nowrap">${warning.id}</td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <div class="font-medium text-white">${warning.mod}</div>
                    </td>
                    <td class="px-6 py-4">
                        <div class="font-medium text-white">${warning.title}</div>
                    </td>
                    <td class="px-6 py-4">
                        <div class="text-sm text-gray-300 max-w-xs truncate">${warning.content}</div>
                    </td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <span class="status-${warning.type}">${getTypeName(warning.type)}</span>
                    </td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <button class="btn-edit mr-2" onclick="openWarningModal(${warning.id})">
                            <i class="fa fa-pencil mr-1"></i>编辑
                        </button>
                        <button class="btn-danger" onclick="confirmDeleteWarning(${warning.id})">
                            <i class="fa fa-trash mr-1"></i>删除
                        </button>
                    </td>
                `;
            tableBody.appendChild(row);
        });
    }

    // 显示所有评论
    function displayComments() {
        const tableBody = document.getElementById('commentTableBody');
        tableBody.innerHTML = '';

        if (comments.length === 0) {
            const row = document.createElement('tr');
            row.innerHTML = `<td colspan="6" class="px-6 py-4 text-center text-gray-400">没有找到评论</td>`;
            tableBody.appendChild(row);
            return;
        }

        comments.forEach(comment => {
            const row = document.createElement('tr');
            row.className = 'hover:bg-dark-light/50 transition-colors duration-200';
            row.innerHTML = `
                    <td class="px-6 py-4 whitespace-nowrap">${comment.id}</td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <div class="font-medium text-white">${comment.mod}</div>
                    </td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <div class="text-sm text-gray-300">${comment.user}</div>
                    </td>
                    <td class="px-6 py-4">
                        <div class="text-sm text-gray-300 max-w-xs truncate">${comment.content}</div>
                    </td>
                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">${comment.createdAt}</td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <button class="btn-edit mr-2" onclick="openCommentModal(${comment.id})">
                            <i class="fa fa-pencil mr-1"></i>编辑
                        </button>
                        <button class="btn-danger" onclick="confirmDeleteComment(${comment.id})">
                            <i class="fa fa-trash mr-1"></i>删除
                        </button>
                    </td>
                `;
            tableBody.appendChild(row);
        });
    }

    // 显示所有审核
    function displayReviews() {
        const tableBody = document.getElementById('reviewTableBody');
        tableBody.innerHTML = '';

        if (reviews.length === 0) {
            const row = document.createElement('tr');
            row.innerHTML = `<td colspan="5" class="px-6 py-4 text-center text-gray-400">没有找到审核信息</td>`;
            tableBody.appendChild(row);
            return;
        }

        reviews.forEach(review => {
            const row = document.createElement('tr');
            row.className = 'hover:bg-dark/50 transition-colors duration-200';
            row.innerHTML = `
                    <td class="px-6 py-4 whitespace-nowrap">${review.id}</td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <div class="font-medium text-white">${review.mod}</div>
                    </td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        <span class="px-2 py-1 text-xs font-medium rounded-full 
                            ${review.status === 'pending' ? 'bg-yellow-500 text-white' :
                review.status === 'approved' ? 'bg-green-500 text-white' :
                    'bg-red-500 text-white'}">
                            ${review.status === 'pending' ? '待审核' :
                review.status === 'approved' ? '已通过' : '已拒绝'}
                        </span>
                    </td>
                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">${review.submittedAt}</td>
                    <td class="px-6 py-4 whitespace-nowrap">
                        ${review.status === 'pending' ? `
                            <button class="btn-approve mr-2" onclick="openReviewModal(${review.id})">
                                <i class="fa fa-check mr-1"></i>通过
                            </button>
                            <button class="btn-reject" onclick="openReviewModal(${review.id})">
                                <i class="fa fa-times mr-1"></i>拒绝
                            </button>
                        ` : `
                            <button class="btn-edit" onclick="openReviewModal(${review.id})">
                                <i class="fa fa-pencil mr-1"></i>编辑
                            </button>
                        `}
                    </td>
                `;
            tableBody.appendChild(row);
        });
    }

    // 获取类型的显示名称
    function getTypeName(type) {
        switch (type) {
            case 'critical':
                return '严重';
            case 'medium':
                return '中等';
            case 'minor':
                return '轻微';
            case 'info':
                return '信息';
            default:
                return type;
        }
    }

    // 打开开发者/开发团队模态框
    function openDeveloperModal(id) {
        const modal = document.getElementById('developerModal');
        const modalContent = document.getElementById('developerModalContent');

        // 显示模态框并添加动画效果
        modal.classList.remove('hidden');
        setTimeout(() => {
            modalContent.classList.remove('scale-95', 'opacity-0');
            modalContent.classList.add('scale-100', 'opacity-100');
        }, 10);

        if (id) {
            const developer = developers.find(dev => dev.id === id);
            if (developer) {
                currentDeveloperId = id;
                document.getElementById('developerId').value = id;
                document.getElementById('developerName').value = developer.name;
                document.getElementById('developerDescription').value = developer.description;
            }
        } else {
            currentDeveloperId = null;
            document.getElementById('developerId').value = '';
            document.getElementById('developerName').value = '';
            document.getElementById('developerDescription').value = '';
        }
    }

    // 关闭开发者/开发团队模态框
    function closeDeveloperModal() {
        const modal = document.getElementById('developerModal');
        const modalContent = document.getElementById('developerModalContent');

        // 添加关闭动画
        modalContent.classList.remove('scale-100', 'opacity-100');
        modalContent.classList.add('scale-95', 'opacity-0');
        setTimeout(() => {
            modal.classList.add('hidden');
        }, 300);
    }

    // 保存开发者/开发团队信息
    function saveDeveloper() {
        const name = document.getElementById('developerName').value;
        const description = document.getElementById('developerDescription').value;

        if (!name) {
            alert('名称不能为空');
            return;
        }

        if (currentDeveloperId) {
            const developer = developers.find(dev => dev.id === currentDeveloperId);
            if (developer) {
                developer.name = name;
                developer.description = description;
            }
        } else {
            const newId = developers.length > 0 ? Math.max(...developers.map(dev => dev.id)) + 1 : 1;
            developers.push({id: newId, name, description, createdAt: new Date().toISOString().split('T')[0]});
        }

        closeDeveloperModal();
        displayDevelopers();

        // 添加成功提示
        showNotification('开发者/团队信息已保存', 'success');
    }

    // 确认删除开发者
    function confirmDeleteDeveloper(id) {
        const developer = developers.find(dev => dev.id === id);
        if (developer) {
            document.getElementById('confirmDeleteTitle').textContent = '确认删除开发者/团队';
            document.getElementById('confirmDeleteMessage').textContent = `你确定要删除 "${developer.name}" 吗？此操作不可撤销。`;
            deleteCallback = () => deleteDeveloper(id);
            openConfirmDeleteModal();
        }
    }

    // 删除开发者/开发团队
    function deleteDeveloper(id) {
        developers = developers.filter(dev => dev.id !== id);
        closeConfirmDeleteModal();
        displayDevelopers();

        // 添加删除成功提示
        showNotification('开发者/团队已删除', 'success');
    }

    // 打开警告模态框
    function openWarningModal(id) {
        const modal = document.getElementById('warningModal');
        const modalContent = document.getElementById('warningModalContent');

        // 显示模态框并添加动画效果
        modal.classList.remove('hidden');
        setTimeout(() => {
            modalContent.classList.remove('scale-95', 'opacity-0');
            modalContent.classList.add('scale-100', 'opacity-100');
        }, 10);

        if (id) {
            const warning = warnings.find(warn => warn.id === id);
            if (warning) {
                currentWarningId = id;
                document.getElementById('warningId').value = id;
                document.getElementById('warningMod').value = warning.mod;
                document.getElementById('warningTitle').value = warning.title;
                document.getElementById('warningContent').value = warning.content;
                document.getElementById('warningType').value = warning.type;
            }
        } else {
            currentWarningId = null;
            document.getElementById('warningId').value = '';
            document.getElementById('warningMod').value = '';
            document.getElementById('warningTitle').value = '';
            document.getElementById('warningContent').value = '';
            document.getElementById('warningType').value = 'critical';
        }
    }

    // 关闭警告模态框
    function closeWarningModal() {
        const modal = document.getElementById('warningModal');
        const modalContent = document.getElementById('warningModalContent');

        // 添加关闭动画
        modalContent.classList.remove('scale-100', 'opacity-100');
        modalContent.classList.add('scale-95', 'opacity-0');
        setTimeout(() => {
            modal.classList.add('hidden');
        }, 300);
    }

    // 保存警告信息
    function saveWarning() {
        const mod = document.getElementById('warningMod').value;
        const title = document.getElementById('warningTitle').value;
        const content = document.getElementById('warningContent').value;
        const type = document.getElementById('warningType').value;

        if (!mod || !title || !content) {
            alert('模组、标题和内容不能为空');
            return;
        }

        if (currentWarningId) {
            const warning = warnings.find(warn => warn.id === currentWarningId);
            if (warning) {
                warning.mod = mod;
                warning.title = title;
                warning.content = content;
                warning.type = type;
            }
        } else {
            const newId = warnings.length > 0 ? Math.max(...warnings.map(warn => warn.id)) + 1 : 1;
            warnings.push({id: newId, mod, title, content, type, createdAt: new Date().toISOString().split('T')[0]});
        }

        closeWarningModal();
        displayWarnings();

        // 添加成功提示
        showNotification('MOD警示信息已保存', 'success');
    }

    // 确认删除警告
    function confirmDeleteWarning(id) {
        const warning = warnings.find(warn => warn.id === id);
        if (warning) {
            document.getElementById('confirmDeleteTitle').textContent = '确认删除MOD警示';
            document.getElementById('confirmDeleteMessage').textContent = `你确定要删除 "${warning.title}" 吗？此操作不可撤销。`;
            deleteCallback = () => deleteWarning(id);
            openConfirmDeleteModal();
        }
    }

    // 删除警告
    function deleteWarning(id) {
        warnings = warnings.filter(warn => warn.id !== id);
        closeConfirmDeleteModal();
        displayWarnings();

        // 添加删除成功提示
        showNotification('MOD警示已删除', 'success');
    }

    // 打开评论模态框
    function openCommentModal(id) {
        const modal = document.getElementById('commentModal');
        const modalContent = document.getElementById('commentModalContent');

        // 显示模态框并添加动画效果
        modal.classList.remove('hidden');
        setTimeout(() => {
            modalContent.classList.remove('scale-95', 'opacity-0');
            modalContent.classList.add('scale-100', 'opacity-100');
        }, 10);

        if (id) {
            const comment = comments.find(comm => comm.id === id);
            if (comment) {
                currentCommentId = id;
                document.getElementById('commentId').value = id;
                document.getElementById('commentMod').value = comment.mod;
                document.getElementById('commentUser').value = comment.user;
                document.getElementById('commentContent').value = comment.content;
            }
        } else {
            currentCommentId = null;
            document.getElementById('commentId').value = '';
            document.getElementById('commentMod').value = '';
            document.getElementById('commentUser').value = '';
            document.getElementById('commentContent').value = '';
        }
    }

    // 关闭评论模态框
    function closeCommentModal() {
        const modal = document.getElementById('commentModal');
        const modalContent = document.getElementById('commentModalContent');

        // 添加关闭动画
        modalContent.classList.remove('scale-100', 'opacity-100');
        modalContent.classList.add('scale-95', 'opacity-0');
        setTimeout(() => {
            modal.classList.add('hidden');
        }, 300);
    }

    // 保存评论信息
    function saveComment() {
        const mod = document.getElementById('commentMod').value;
        const user = document.getElementById('commentUser').value;
        const content = document.getElementById('commentContent').value;

        if (!mod || !user || !content) {
            alert('模组、用户和内容不能为空');
            return;
        }

        if (currentCommentId) {
            const comment = comments.find(comm => comm.id === currentCommentId);
            if (comment) {
                comment.mod = mod;
                comment.user = user;
                comment.content = content;
            }
        } else {
            const newId = comments.length > 0 ? Math.max(...comments.map(comm => comm.id)) + 1 : 1;
            comments.push({id: newId, mod, user, content, createdAt: new Date().toISOString().split('T')[0]});
        }
        closeCommentModal();
        displayComments();

        // 添加成功提示
        showNotification('评论已保存', 'success');
    }

    // 确认删除评论
    function confirmDeleteComment(id) {
        const comment = comments.find(comm => comm.id === id);
        if (comment) {
            document.getElementById('confirmDeleteTitle').textContent = '确认删除评论';
            document.getElementById('confirmDeleteMessage').textContent = `你确定要删除 "${comment.user}" 的评论吗？此操作不可撤销。`;
            deleteCallback = () => deleteComment(id);
            openConfirmDeleteModal();
        }
    }

    // 删除评论
    function deleteComment(id) {
        comments = comments.filter(comm => comm.id !== id);
        closeConfirmDeleteModal();
        displayComments();

        // 添加删除成功提示
        showNotification('评论已删除', 'success');
    }

    // 打开审核模态框
    function openReviewModal(id) {
        const modal = document.getElementById('reviewModal');
        const modalContent = document.getElementById('reviewModalContent');

        // 显示模态框并添加动画效果
        modal.classList.remove('hidden');
        setTimeout(() => {
            modalContent.classList.remove('scale-95', 'opacity-0');
            modalContent.classList.add('scale-100', 'opacity-100');
        }, 10);

        if (id) {
            const review = reviews.find(rev => rev.id === id);
            if (review) {
                currentReviewId = id;
                document.getElementById('reviewId').value = id;
                document.getElementById('reviewMod').value = review.mod;
                document.getElementById('reviewStatus').value = review.status;
                document.getElementById('reviewComment').value = review.comment;
            }
        } else {
            currentReviewId = null;
            document.getElementById('reviewId').value = '';
            document.getElementById('reviewMod').value = '';
            document.getElementById('reviewStatus').value = 'pending';
            document.getElementById('reviewComment').value = '';
        }
    }

    // 关闭审核模态框
    function closeReviewModal() {
        const modal = document.getElementById('reviewModal');
        const modalContent = document.getElementById('reviewModalContent');

        // 添加关闭动画
        modalContent.classList.remove('scale-100', 'opacity-100');
        modalContent.classList.add('scale-95', 'opacity-0');
        setTimeout(() => {
            modal.classList.add('hidden');
        }, 300);
    }

    // 保存审核信息
    function saveReview() {
        const mod = document.getElementById('reviewMod').value;
        const status = document.getElementById('reviewStatus').value;
        const comment = document.getElementById('reviewComment').value;

        if (!mod || !status) {
            alert('模组和状态不能为空');
            return;
        }

        if (currentReviewId) {
            const review = reviews.find(rev => rev.id === currentReviewId);
            if (review) {
                review.mod = mod;
                review.status = status;
                review.comment = comment;
            }
        } else {
            const newId = reviews.length > 0 ? Math.max(...reviews.map(rev => rev.id)) + 1 : 1;
            reviews.push({id: newId, mod, status, comment, createdAt: new Date().toISOString().split('T')[0]});
        }

        closeReviewModal();
        displayReviews();

        // 添加成功提示
        showNotification('审核信息已保存', 'success');
    }

    // 确认删除审核
    function confirmDeleteReview(id) {
        const review = reviews.find(rev => rev.id === id);
        if (review) {
            document.getElementById('confirmDeleteTitle').textContent = '确认删除审核';
            document.getElementById('confirmDeleteMessage').textContent = `你确定要删除 "${review.mod}" 的审核吗？此操作不可撤销。`;
            deleteCallback = () => deleteReview(id);
            openConfirmDeleteModal();
        }
    }

    // 删除审核
    function deleteReview(id) {
        reviews = reviews.filter(rev => rev.id !== id);
        closeConfirmDeleteModal();
        displayReviews();

        // 添加删除成功提示
        showNotification('审核已删除', 'success');
    }

    // 打开确认删除模态框
    function openConfirmDeleteModal() {
        const modal = document.getElementById('confirmDeleteModal');
        const modalContent = document.getElementById('confirmDeleteModalContent');

        // 显示模态框并添加动画效果
        modal.classList.remove('hidden');
        setTimeout(() => {
            modalContent.classList.remove('scale-95', 'opacity-0');
            modalContent.classList.add('scale-100', 'opacity-100');
        }, 10);
    }

    // 关闭确认删除模态框
    function closeConfirmDeleteModal() {
        const modal = document.getElementById('confirmDeleteModal');
        const modalContent = document.getElementById('confirmDeleteModalContent');

        // 添加关闭动画
        modalContent.classList.remove('scale-100', 'opacity-100');
        modalContent.classList.add('scale-95', 'opacity-0');
        setTimeout(() => {
            modal.classList.add('hidden');
        }, 300);
    }

    // 确认删除
    function confirmDelete() {
        deleteCallback();
        closeConfirmDeleteModal();
    }


    // 显示通知
    function showNotification(message, type) {
        const notification = document.getElementById('notification');
        notification.textContent = message;
        notification.classList.remove('hidden', 'bg-red-500', 'bg-green-500', 'bg-yellow-500');
        notification.classList.add(`bg-${type}-500`);
        setTimeout(() => {
            notification.classList.add('hidden');
        }, 3000);
    }


    // 更新开发者表格
    function updateDeveloperTable() {
        const developerList = document.getElementById('developerList');
        developerList.innerHTML = '';
        developers.forEach(developer => {
            const li = document.createElement('li');
            li.classList.add('flex', 'items-center', 'py-2', 'px-4', 'border-b', 'border-gray-200');
            li.innerHTML = `
                    <div class="flex-1 mr-4">
                        <p class="text-sm font-medium text-gray-900">${developer.name}</p>
                        <p class="text-xs text-gray-500">${developer.description}</p>
                    </div>
                    <div class="flex items-center">
                        <button class="text-gray-400 hover:text-gray-600" onclick="openDeveloperModal(${developer.id})">编辑</button>
                        <button class="ml-2 text-red-500 hover:text-red-600" onclick="confirmDeleteDeveloper(${developer.id})">删除</button>
                    </div>
                `;
            developerList.appendChild(li);
        });
    }


    // 转换警告类型为字符串
    function warningTypeToString(type) {
        switch (type) {
            case 'other':
                return '其他';
            case 'ban':
                return '封禁';
            case 'update':
                return '更新';
            case 'other':
                return '其他';
            default:
                return '未知';
        }
    }

    // 转换审核状态为字符串
    function reviewStatusToString(status) {
        switch (status) {
            case 'pending':
                return '待审核';
            case 'approved':
                return '已通过';
            case'rejected':
                return '已拒绝';
            default:
                return '未知';
        }
    }


    // 关闭模态框
    function closeModal(id) {
        const modal = document.getElementById(id);
        const modalContent = document.getElementById(`${id}Content`);

        // 添加关闭动画
        modalContent.classList.remove('scale-100', 'opacity-100');
        modalContent.classList.add('scale-95', 'opacity-0');
        setTimeout(() => {
            modal.classList.add('hidden');
        }, 300);
    }


    // 确认提交开发者
    function confirmSubmitDeveloper() {
        const name = document.getElementById('developerName').value.trim();
        const description = document.getElementById('developerDescription').value.trim();
        if (name && description) {
            if (currentDeveloperId) {
                const developer = developers.find(dev => dev.id === currentDeveloperId);
                if (developer) {
                    developer.name = name;
                    developer.description = description;
                    updateDeveloperTable();
                    closeModal('developerModal');
                    showNotification('开发者信息已更新', 'success');
                }
            } else {
                const newDeveloper = {
                    id: Date.now(),
                    name,
                    description
                };
                developers.push(newDeveloper);
                updateDeveloperTable();
                closeModal('developerModal');
                showNotification('开发者信息已保存', 'success');
            }
        } else {
            showNotification('请填写完整的开发者信息', 'error');
        }
    }

    // 确认提交评论
    function confirmSubmitComment() {
        const mod = document.getElementById('commentMod').value.trim();
        const user = document.getElementById('commentUser').value.trim();
        const content = document.getElementById('commentContent').value.trim();
        if (mod && user && content) {
            if (currentCommentId) {
                const comment = comments.find(comm => comm.id === currentCommentId);
                if (comment) {
                    comment.mod = mod;
                    comment.user = user;
                    comment.content = content;
                    displayComments();
                    closeModal('commentModal');
                    showNotification('评论信息已更新', 'success');
                }
            } else {
                const newComment = {
                    id: Date.now(),
                    mod,
                    user,
                    content,
                    createdAt: new Date().toLocaleString()
                };
                comments.push(newComment);
                displayComments();
                closeModal('commentModal');
                showNotification('评论信息已保存', 'success');
            }
        } else {
            showNotification('请填写完整的评论信息', 'error');
        }
    }


    // 更新评论表格
    function updateCommentTable() {
        const table = document.getElementById('commentTable');
        table.innerHTML = '';
        const thead = document.createElement('thead');
        const tr = document.createElement('tr');
        tr.innerHTML = `
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">模组</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">用户</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">内容</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">创建时间</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">操作</th>
            `;
        thead.appendChild(tr);
        table.appendChild(thead);
        const tbody = document.createElement('tbody');
        comments.forEach(comment => {
            const tr = document.createElement('tr');
            tr.innerHTML = `
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${comment.mod}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${comment.user}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${comment.content}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${comment.createdAt}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">
                        <button class="text-gray-400 hover:text-gray-600" onclick="editComment(${comment.id})">编辑</button>
                    </td>
                `;
            tbody.appendChild(tr);
        });
        table.appendChild(tbody);
    }

    // 更新警告表格
    function updateWarningTable() {
        const table = document.getElementById('warningTable');
        table.innerHTML = '';
        const thead = document.createElement('thead');
        const tr = document.createElement('tr');
        tr.innerHTML = `
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">模组</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">类型</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">标题</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">内容</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">创建时间</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">操作</th>
            `;
        thead.appendChild(tr);
        table.appendChild(thead);
        const tbody = document.createElement('tbody');
        warnings.forEach(warning => {
            const tr = document.createElement('tr');
            tr.innerHTML = `
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${warning.mod}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${warningTypeToString(warning.type)}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${warning.title}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${warning.content}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${warning.createdAt}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">
                        <button class="text-gray-400 hover:text-gray-600" onclick="editWarning(${warning.id})">编辑</button>
                    </td>
                `;
            tbody.appendChild(tr);
        });
        table.appendChild(tbody);
    }

    // 更新审核表格
    function updateReviewTable() {
        const table = document.getElementById('reviewTable');
        table.innerHTML = '';
        const thead = document.createElement('thead');
        const tr = document.createElement('tr');
        tr.innerHTML = `
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">模组</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">状态</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">评论</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">创建时间</th>
                <th class="px-6 py-3 border-b-2 border-gray-200 text-left text-sm leading-4 text-gray-500">操作</th>
            `;
        thead.appendChild(tr);
        table.appendChild(thead);
        const tbody = document.createElement('tbody');
        reviews.forEach(review => {
            const tr = document.createElement('tr');
            tr.innerHTML = `
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${review.mod}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${reviewStatusToString(review.status)}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${review.comment}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">${review.createdAt}</td>
                    <td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200">
                        <button class="text-gray-400 hover:text-gray-600" onclick="editReview(${review.id})">编辑</button>
                    </td>
                `;
            tbody.appendChild(tr);
        });
        table.appendChild(tbody);
    }


    // 显示模组信息
    function displayModInfo() {
        const modInfo = document.getElementById('modInfo');
        modInfo.innerHTML = `
                <div class="flex flex-col">
                    <div class="flex items-center mb-2">
                        <p class="text-lg font-bold">${mod.name}</p>
                        <button class="ml-2 text-gray-400 hover:text-gray-600" onclick="editMod()">编辑</button>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">版本：${mod.version}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">作者：${mod.author}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">描述：${mod.description}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">分类：${mod.category}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">标签：${mod.tags.join(', ')}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">下载量：${mod.downloads}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">发布时间：${mod.createdAt}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">更新时间：${mod.updatedAt}</p>
                    </div>
                </div>
            `;
    }


    // 显示上传文件
    function displayUploads() {
        const uploadList = document.getElementById('uploadList');
        uploadList.innerHTML = '';
        uploads.forEach(upload => {
            const li = document.createElement('li');
            li.classList.add('flex', 'items-center', 'py-2', 'px-4', 'border-b', 'border-gray-200');
            li.innerHTML = `
                    <div class="flex-1 mr-4">
                        <p class="text-sm font-medium text-gray-900">${upload.name}</p>
                        <p class="text-sm text-gray-500">${upload.createdAt}</p>
                    </div>
                    <div class="flex-1">
                        <p class="text-sm text-gray-900">${upload.description}</p>
                    </div>
                    <div class="flex items-center">
                        <button class="text-gray-400 hover:text-gray-600" onclick="confirmDeleteUpload(${upload.id})">删除</button>
                    </div>
                `;
            uploadList.appendChild(li);
        });
    }

    // 显示用户信息
    function displayUserInfo() {
        const userInfo = document.getElementById('userInfo');
        userInfo.innerHTML = `
                <div class="flex flex-col">
                    <div class="flex items-center mb-2">
                        <p class="text-lg font-bold">${user.username}</p>
                        <button class="ml-2 text-gray-400 hover:text-gray-600" onclick="editUser()">编辑</button>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">邮箱：${user.email}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">注册时间：${user.createdAt}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">最近登录：${user.lastLoginAt}</p>
                    </div>
                </div>
            `;
    }

    // 显示管理员信息
    function displayAdminInfo() {
        const adminInfo = document.getElementById('adminInfo');
        adminInfo.innerHTML = `
                <div class="flex flex-col">
                    <div class="flex items-center mb-2">
                        <p class="text-lg font-bold">${admin.username}</p>
                        <button class="ml-2 text-gray-400 hover:text-gray-600" onclick="editAdmin()">编辑</button>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">邮箱：${admin.email}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">注册时间：${admin.createdAt}</p>
                    </div>
                    <div class="flex items-center mb-2">
                        <p class="text-sm text-gray-500">最近登录：${admin.lastLoginAt}</p>
                    </div>
                </div>
            `;
    }

    // 显示模组列表
    function displayModList() {
        const modList = document.getElementById('modList');
        modList.innerHTML = '';
        mods.forEach(mod => {
            const li = document.createElement('li');
            li.classList.add('flex', 'items-center', 'py-2', 'px-4', 'border-b', 'border-gray-200');
            li.innerHTML = `
                    <div class="flex-1 mr-4">
                        <p class="text-sm font-medium text-gray-900">${mod.name}</p>
                        <p class="text-sm text-gray-500">${mod.version}</p>
                    </div>
                    <div class="flex-1">
                        <p class="text-sm text-gray-900">${mod.author}</p>
                        <p class="text-sm text-gray-500">${mod.description}</p>
                    </div>
                    <div class="flex items-center">
                        <button class="text-gray-400 hover:text-gray-600" onclick="viewMod(${mod.id})">查看</button>
                    </div>
                `;
            modList.appendChild(li);
        });
    }

    // 显示用户列表
    function displayUserList() {
        const userList = document.getElementById('userList');
        userList.innerHTML = '';
        users.forEach(user => {
            const li = document.createElement('li');
            li.classList.add('flex', 'items-center', 'py-2', 'px-4', 'border-b', 'border-gray-200');
            li.innerHTML = `
                    <div class="flex-1 mr-4">
                        <p class="text-sm font-medium text-gray-900">${user.username}</p>
                        <p class="text-sm text-gray-500">${user.email}</p>
                    </div>
                    <div class="flex-1">
                        <p class="text-sm text-gray-900">${user.createdAt}</p>
                        <p class="text-sm text-gray-500">${user.lastLoginAt}</p>
                    </div>
                    <div class="flex items-center">
                        <button class="text-gray-400 hover:text-gray-600" onclick="viewUser(${user.id})">查看</button>
                    </div>
                `;
            userList.appendChild(li);
        });
    }

    // 显示管理员列表
    function displayAdminList() {
        const adminList = document.getElementById('adminList');
        adminList.innerHTML = '';
        admins.forEach(admin => {
            const li = document.createElement('li');
            li.classList.add('flex', 'items-center', 'py-2', 'px-4', 'border-b', 'border-gray-200');
            li.innerHTML = `
                    <div class="flex-1 mr-4">
                        <p class="text-sm font-medium text-gray-900">${admin.username}</p>
                        <p class="text-sm text-gray-500">${admin.email}</p>
                    </div>
                    <div class="flex-1">
                        <p class="text-sm text-gray-900">${admin.createdAt}</p>
                        <p class="text-sm text-gray-500">${admin.lastLoginAt}</p>
                    </div>
                    <div class="flex items-center">
                        <button class="text-gray-400 hover:text-gray-600" onclick="viewAdmin(${admin.id})">查看</button>
                    </div>
                `;
            adminList.appendChild(li);
        });
    }

    // 显示评论表单
    function displayCommentForm() {
        const commentForm = document.getElementById('commentForm');
        commentForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">评论</label>
                    <textarea id="commentContent" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="4"></textarea>
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="addComment()">发布</button>
                </div>
            `;
    }

    // 显示警告表单
    function displayWarningForm() {
        const warningForm = document.getElementById('warningForm');
        warningForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">标题</label>
                    <input type="text" id="warningTitle" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">内容</label>
                    <textarea id="warningContent" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="4"></textarea>
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="addWarning()">发布</button>
                </div>
            `;
    }

    // 显示审核表单
    function displayReviewForm() {
        const reviewForm = document.getElementById('reviewForm');
        reviewForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">评论</label>
                    <textarea id="reviewComment" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="4"></textarea>
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="addReview()">发布</button>
                </div>
            `;
    }

    // 显示上传文件表单
    function displayUploadForm() {
        const uploadForm = document.getElementById('uploadForm');
        uploadForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">文件名</label>
                    <input type="text" id="uploadName" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">描述</label>
                    <textarea id="uploadDescription" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="4"></textarea>
                    <label class="block text-sm font-medium text-gray-700 mt-2">文件</label>
                    <input type="file" id="uploadFile" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="addUpload()">上传</button>
                </div>
            `;
    }

    // 显示编辑用户表单
    function displayEditUserForm() {
        const editUserForm = document.getElementById('editUserForm');
        editUserForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">用户名</label>
                    <input type="text" id="editUsername" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" value="${user.username}" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">邮箱</label>
                    <input type="text" id="editEmail" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" value="${user.email}" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="updateUser()">更新</button>
                </div>
            `;
    }

    // 显示编辑管理员表单
    function displayEditAdminForm() {
        const editAdminForm = document.getElementById('editAdminForm');
        editAdminForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">用户名</label>
                    <input type="text" id="editUsername" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" value="${admin.username}" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">邮箱</label>
                    <input type="text" id="editEmail" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" value="${admin.email}" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="updateAdmin()">更新</button>
                </div>
            `;
    }

    // 显示查看模组表单
    function displayViewModForm() {
        const viewModForm = document.getElementById('viewModForm');
        viewModForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">名称</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${mod.name}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">版本</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${mod.version}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">作者</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${mod.author}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">描述</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${mod.description}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">下载地址</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${mod.downloadUrl}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">上传时间</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${mod.createdAt}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">更新时间</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${mod.updatedAt}</p>
                </div>
            `;
    }

    // 显示查看用户表单
    function displayViewUserForm() {
        const viewUserForm = document.getElementById('viewUserForm');
        viewUserForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">用户名</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${user.username}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">邮箱</label>
<p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${user.email}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">注册时间</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${user.createdAt}</p>
                </div>
            `;


        // 显示查看警告表单
        function displayViewWarningForm() {
            const viewWarningForm = document.getElementById('viewWarningForm');
            viewWarningForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">标题</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${warning.title}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">内容</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${warning.content}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">发布时间</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${warning.createdAt}</p>
                </div>
            `;
        }

        // 显示查看评论表单
        function displayViewCommentForm() {
            const viewCommentForm = document.getElementById('viewCommentForm');
            viewCommentForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">内容</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${comment.content}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">发布时间</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${comment.createdAt}</p>
                </div>
            `;
        }

        // 显示查看审核表单
        function displayViewReviewForm() {
            const viewReviewForm = document.getElementById('viewReviewForm');
            viewReviewForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">评论</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${review.comment}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">发布时间</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${review.createdAt}</p>
                </div>
            `;
        }

        // 显示查看管理员表单
        function displayViewAdminForm() {
            const viewAdminForm = document.getElementById('viewAdminForm');
            viewAdminForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">用户名</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${admin.username}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">邮箱</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${admin.email}</p>
                    <label class="block text-sm font-medium text-gray-700 mt-2">注册时间</label>
                    <p class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">${admin.createdAt}</p>
                </div>
            `;
        }

        // 显示上传模组表单
        function displayUploadModForm() {
            const uploadModForm = document.getElementById('uploadModForm');
            uploadModForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">名称</label>
                    <input type="text" id="modName" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">版本</label>
                    <input type="text" id="modVersion" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">作者</label>
                    <input type="text" id="modAuthor" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">描述</label>
                    <textarea id="modDescription" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="3"></textarea>
                    <label class="block text-sm font-medium text-gray-700 mt-2">下载地址</label>
                    <input type="text" id="modDownloadUrl" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadMod()">上传</button>
                </div>
            `;
        }

        // 显示上传评论表单
        function displayUploadCommentForm() {
            const uploadCommentForm = document.getElementById('uploadCommentForm');
            uploadCommentForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">内容</label>
                    <textarea id="commentContent" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="3"></textarea>
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadComment()">上传</button>
                </div>
            `;
        }

        // 显示上传审核表单
        function displayUploadReviewForm() {
            const uploadReviewForm = document.getElementById('uploadReviewForm');
            uploadReviewForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">评论</label>
                    <textarea id="reviewComment" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="3"></textarea>
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadReview()">上传</button>
                </div>
            `;
        }

        // 显示上传警告表单
        function displayUploadWarningForm() {
            const uploadWarningForm = document.getElementById('uploadWarningForm');
            uploadWarningForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">标题</label>
                    <input type="text" id="warningTitle" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">内容</label>
                    <textarea id="warningContent" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="3"></textarea>
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadWarning()">上传</button>
                </div>
            `;
        }

        // 显示上传管理员表单
        function displayUploadAdminForm() {
            const uploadAdminForm = document.getElementById('uploadAdminForm');
            uploadAdminForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">用户名</label>
                    <input type="text" id="adminUsername" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">密码</label>
                    <input type="password" id="adminPassword" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">邮箱</label>
                    <input type="text" id="adminEmail" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadAdmin()">上传</button>
                </div>
            `;
        }

        // 显示上传文件表单
        function displayUploadFileForm() {
            const uploadFileForm = document.getElementById('uploadFileForm');
            uploadFileForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">文件</label>
                    <input type="file" id="fileInput" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadFile()">上传</button>
                </div>
            `;
        }

        // 显示上传图片表单
        function displayUploadImageForm() {
            const uploadImageForm = document.getElementById('uploadImageForm');
            uploadImageForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">图片</label>
                    <input type="file" id="imageInput" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadImage()">上传</button>
                </div>
            `;
        }

        // 显示上传视频表单
        function displayUploadVideoForm() {
            const uploadVideoForm = document.getElementById('uploadVideoForm');
            uploadVideoForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">视频</label>
                    <input type="file" id="videoInput" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadVideo()">上传</button>
                </div>
            `;
        }

        // 显示上传音频表单
        function displayUploadAudioForm() {
            const uploadAudioForm = document.getElementById('uploadAudioForm');
            uploadAudioForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">音频</label>
                    <input type="file" id="audioInput" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadAudio()">上传</button>
                </div>
            `;
        }

        // 显示上传链接表单
        function displayUploadLinkForm() {
            const uploadLinkForm = document.getElementById('uploadLinkForm');
            uploadLinkForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">标题</label>
                    <input type="text" id="linkTitle" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">链接</label>
                    <input type="text" id="linkUrl" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadLink()">上传</button>
                </div>
            `;
        }

        // 显示上传文章表单
        function displayUploadArticleForm() {
            const uploadArticleForm = document.getElementById('uploadArticleForm');
            uploadArticleForm.innerHTML = `
                <div class="flex flex-col">
                    <label class="block text-sm font-medium text-gray-700">标题</label>
                    <input type="text" id="articleTitle" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" />
                    <label class="block text-sm font-medium text-gray-700 mt-2">内容</label>
                    <textarea id="articleContent" class="block w-full mt-1 border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" rows="3"></textarea>
                    <button class="mt-2 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" onclick="uploadArticle()">上传</button>
                </div>
            `;
        }
    }
</script>